<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/10/15
  Time: 17:02
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>

    <script>
        var obj = {
            "resultcode": "200", "reason": "successed!", "result": {
                "sk": {
                    "temp": "29",
                    "wind_direction": "西北风",
                    "wind_strength": "1级",
                    "humidity": "59%",
                    "time": "16:35"
                },
                "today": {
                    "temperature": "22℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期四",
                    "city": "深圳",
                    "date_y": "2020年10月15日",
                    "dressing_index": "热",
                    "dressing_advice": "天气热，建议着短裙、短裤、短薄外套、T恤等夏季服装。",
                    "uv_index": "弱",
                    "comfort_index": "",
                    "wash_index": "较适宜",
                    "travel_index": "适宜",
                    "exercise_index": "适宜",
                    "drying_index": ""
                },
                "future": [{
                    "temperature": "22℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期四",
                    "date": "20201015"
                }, {
                    "temperature": "22℃~29℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期五",
                    "date": "20201016"
                }, {
                    "temperature": "20℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期六",
                    "date": "20201017"
                }, {
                    "temperature": "21℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "东北风3-5级",
                    "week": "星期日",
                    "date": "20201018"
                }, {
                    "temperature": "22℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "东北风3-5级",
                    "week": "星期一",
                    "date": "20201019"
                }, {
                    "temperature": "20℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期二",
                    "date": "20201020"
                }, {
                    "temperature": "20℃~28℃",
                    "weather": "多云",
                    "weather_id": {"fa": "01", "fb": "01"},
                    "wind": "持续无风向微风",
                    "week": "星期三",
                    "date": "20201021"
                }]
            }, "error_code": 0
        };

        var city = obj.result.today.city;
        alert(city);

        var nodeList = obj.result.future;

        for (var i in nodeList) {
            var node = nodeList[i];
            var date = node.date;
            var wind = node.wind;

            alert(date + "--->" + wind)
        }


    </script>
</head>
<body>

</body>
</html>
